using System;
using Microsoft.SPOT;

namespace Gadgeteer.Interfaces
{
    /// <summary>
    /// A TemperatureHumidity module for Microsoft .NET Gadgeteer
    /// </summary>
    public interface ISensor
    {
        /// <summary>
        /// Begins a sensor measurement and raises the measurement complete event of the specific item event when done.
        /// </summary>
        /// <remarks>
        /// To prevent the sensor from overheating, there is approximately a 3.6 second
        /// wait after each measurement.  If you call this method repeatedly in a shorter
        /// time span, your requests are not queued. Use <see cref="StartContinuousMeasurements"/>
        /// method to obtain continuous measurements.
        /// </remarks>
        void RequestMeasurement();

        /// <summary>
        /// Starts continuous measurements, can be stopped with <see cref="StopContinuousMeasurements"/>.
        /// </summary>
        /// <remarks>
        /// When you call this method, the sensor takes a measurement, raises the Gadgeteer.Modules.Seeed.TemperatureHumidity.MeasurementComplete
        /// event when the measurement is complete, and repeats.  To stop continuous
        /// measurements, call the Gadgeteer.Modules.Seeed.TemperatureHumidity.StopContinuousMeasurements()
        /// method.
        /// To prevent the sensor from overheating, there is approximately a 3.6 second
        /// wait between measurements.
        /// </remarks>
        void StartContinuousMeasurements();

        /// <summary>
        /// Stops continuous measurements.
        /// </summary>
        /// <remarks>
        /// When you called the <see cref="StartContinuousMeasurements"/>, a continuous set of measurements is taken.
        /// Use this method to stop the continuous measurement.
        /// </remarks>
        void StopContinuousMeasurements();      
    }
}
